﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucThemSP.ascx.cs" Inherits="Admin_UserControl_ucThemSP" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<style type="text/css">
    .style1
    {
        text-align: left;
        font-size: medium;
    }
    </style>
<div id="center-column">
    <h1>
        <asp:Label ID="lbltitle" runat="server"></asp:Label>
    </h1>
    <br />
    <div style="font-size: medium">
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Admin/DanhSachSanPham.aspx">Quay lại</asp:HyperLink>
    </div>
    <br />
    <table border="0" cellpadding="0" cellspacing="0">
        <tr valign="top">
            <td>
                <table id="id-form" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <th valign="top" style="width: 160px">
                            Tên sản phẩm:                         </th>
                        <td>
                            <asp:TextBox ID="txtItemName" runat="server" Width="170px"></asp:TextBox>
                            <%--<input type="text" class="inp-form" />--%>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <th valign="top">
                            Danh mục sản phẩm:
                        </th>
                        <td>
                            <asp:DropDownList ID="drCategory" runat="server" with="170px">
                            </asp:DropDownList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <th valign="top">
                            Thông tin sản phẩm</th>
                        <td>
                            <asp:DropDownList ID="drType" runat="server">
                            <asp:ListItem Value="0" Text="Sản phẩm bán chạy"></asp:ListItem>
                            <asp:ListItem Value="1" Text="Sản Phẩm Hot"></asp:ListItem>
                            <asp:ListItem Value = "2" Text = "Sản phẩm khuyến mại"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <th valign="top">
                            Mã sản phẩm
                        </th>
                        <td>
                            <asp:TextBox ID="txtNumber" runat="server" Width="170px" ></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <th valign="top">
                            Sản phẩm không hoạt động:
                        </th>
                        <td>
                            <asp:DropDownList ID="drInactive" runat="server" Width="60px">
                                <asp:ListItem Value="0">No</asp:ListItem>
                                <asp:ListItem Value="1">Yes</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <th valign="top">
                            Mô tả sản phẩm:
                        </th>
                        <td>
                            <%--<asp:TextBox ID="txtDes" runat="server" TextMode="MultiLine" CssClass="form-textarea"></asp:TextBox>--%>
                            <cc1:Editor ID="txtDes" runat="server" NoUnicode="true" />
                        </td>
                        <td style="width: 120px">
                            <asp:HyperLink ID="hypDetails" runat="server">Chi tiết sản phẩm</asp:HyperLink>
                        </td>
                    </tr>
                    <tr>
                        <th valign="top">
                            Giá:
                        </th>
                        <td>
                            <asp:TextBox ID="txtPrice" runat="server" Width="120px"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                            <asp:Button ID="btnSubmit" runat="server"  Text="Lưu" OnClick="btnSubmit_Click"
                                Style="height: 26px" Height="26px" />
                            <asp:Button ID="btnReset" runat="server" Text ="Reset"/>
                        </td>
                        <td>
                            </td>
                    </tr>
                    <tr>
                        <th class="style1" colspan="2">
                            Cập nhật hình ảnh sản phẩm<br />
                        </th>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                 
                    <tr>
                        <td colspan="3" style="padding-left: 90px; text-align: center;">
                            <asp:GridView ID="grdImgItems" runat="server" AutoGenerateColumns="False" EmptyDataText="No images found"
                                Width="500px">
                                <Columns>
                                    <asp:ImageField DataImageUrlField="ImageURL" DataImageUrlFormatString="~/Admin/Images/Items/{0}"
                                        HeaderText="Hình ảnh">
                                        <ControlStyle Height="80px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:ImageField>
                                    <asp:TemplateField HeaderText="Default">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkDefault" runat="server" Enabled="false" />
                                            &nbsp;
                                            <asp:ImageButton ID="btnDefault" runat="server" ImageUrl="~/Admin/images/table/btnDefault.jpg" />
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Xoá">
                                        <ItemTemplate>
                                            <asp:ImageButton ID="btnDelImg" runat="server" CausesValidation="false" CommandArgument='<%# Eval("ID") %>'
                                                CommandName="delete" ImageUrl="~/Admin/images/table/del.gif" OnClick="btnDelImg_Click"/>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                </Columns>
                                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
                                <EmptyDataTemplate>
                                    No images found
                                </EmptyDataTemplate>
                                <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                                <HeaderStyle BackColor="Tan" Font-Bold="True" Height="30px" />
                                <AlternatingRowStyle BackColor="PaleGoldenrod" />
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: center">
                            <b>Thêm hình :
                        </td>
                        <td>
                            <asp:FileUpload ID="fileUpload1" runat="server" Width="230px" />
                            <asp:Button ID="Button1" runat="server" Text="Upload" onclick="Button1_Click" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td style="text-align: center">
                            <asp:Label ID="lblImage" runat="server" Text="Hình ảnh" style="font-weight: 700"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="Label1" runat="server" Enabled="False" Text="  JPEG, GIF 5MB max per image"></asp:Label>
                            <br />
                            <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
                <!-- end id-form  -->
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                <img alt="blank" height="1" src="images/shared/blank.gif" width="695" />
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
</div>
